package at.guigu.controller;

import at.guigu.pojo.Enterprise;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

@RestController
@RequestMapping("/booksThree")
public class BookControllerThree {
    @Autowired
    private Enterprise enterprise;

    @GetMapping("/{id}")
    public String getById(@PathVariable(value = "id") Integer id) {
        System.out.println("id===>" + id);
        int c = enterprise.getC();
        int d = enterprise.getD();
        String[] arrayOne = enterprise.getArrayOne();
        System.out.println("c===>" + c);
        System.out.println("d===>" + d);
        System.out.println("arrayOne===>" + Arrays.toString(arrayOne));
        return "Hello SpringBoot!!!";
    }
}
